{% extends "_base.html" %}

{% block body %}

<div class="container">

  {% block breadcrumbs %}
  <ol class="breadcrumb">
    <li><a href="{{url_prefix + '/'}}">Home</a></li>
      {% for bc in this.breadcrumbs[:-1] %}
      <li><a href="{{bc.url}}">{{bc.title}}</a></li>
      {% endfor %}
      <li class="active">{{this.breadcrumbs[-1].title}}</li>
  </ol>
  {% endblock %}

  <div class="page-header">
    {% block title %}
    <h1>{{this.title}}</h1>
    {% endblock %}
  </div>

  <div class="row">

    {% block sidebar %}
    <div class="col-md-3" role="navigation">
      {% if this.toc %}
      <div class="sidebar" data-spy="affix" data-offset-top="80" data-offset-bottom="60">
        <div class="well">
          <a href="#"><strong>{{this.title}}</strong></a>
          {{this.toc}}
        </div>
      </div>
      {% endif %}
    </div>
    {% endblock %}

    <div class="content">
      {% block content %}
      <div class="col-md-9" role="main">
        {{this.body}}
      </div>
      {% endblock %}
    </div>

  </div>

  {% if this.pager %}
  <ul class="pager">
    {% if this.prev %}
    <li class="previous"><a href="{{this.prev.url}}">&larr; {{this.prev.title}}</a></li>
    {% endif %}
    {% if this.next %}
    <li class="next"><a href="{{this.next.url}}">{{this.next.title}} &rarr;</a></li>
    {% endif %}
  </ul>
  {% endif %}

  {% include 'footer.html' %}

</div>

{% endblock %}

